package com.analysis.web;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GreetingController {

	@RequestMapping("/search")
	public String search() {
		return "search";
	}
	
	@RequestMapping("/")
	public String index(@RequestParam(value = "name", required = false, defaultValue = "World") String name) {
		return "index";
	}
	
	@RequestMapping("/fund")
	public String fund() {
		return "fund";
	}
	
	@RequestMapping("macd")
	public String macd(){
	    return "macd";
	}
	
	@RequestMapping("vue")
	public String vue() {
		return "vue";
	}
	@RequestMapping("/greeting")
	public String greeting(@RequestParam(value = "name", required = false, defaultValue = "World") String name,
			Model model) {
		model.addAttribute("name", name);
		return "greeting";
	}
}